package com.bgIntlgn.client.entity.sells;

import java.util.Date;

import yuhuibear.poat.annotations.action.AutoGenerateValue;
import yuhuibear.poat.annotations.relation.Field;
import yuhuibear.poat.annotations.relation.Table;
import yuhuibear.poat.object.bean.Bean;

/**
 * 发货记录
 * 
 * @author Administrator
 * 
 */

@Table(name = "deliver_records", constrain = "")
public class DeliverRecord implements Bean {

	@AutoGenerateValue(skipOnNull = true, sqlToGet = "select currval('deliver_records_id_seq')")
	@Field(name = "id", type = "bigserial", constrain = "primary key ")
	private Long id;

	@Field(name = "serial_number", type = "varchar(80)", constrain = "unique")
	private String serialNumber;

	@Field(name = "order_cargo_id", type = "int8 ", constrain = " not null references order_cargos(id)  on update cascade on delete cascade")
	private Long orderCargoId;

	/**
	 * 发货配数量
	 */
	@Field(name = "number", type = "int", constrain = "not null default 0")
	private Integer number;

	/**
	 * 发货时间
	 */
	@Field(name = "start_date", type = "timestamp", constrain = "")
	private Date date;

	/**
	 * 发货负责人
	 */
	@Field(name = "charger", type = "int8", constrain = "not null references employees(id)  on update cascade ")
	private Long charger;

	/**
	 * 是否完成。
	 */
	@Field(name = "done", type = "boolean", constrain = "")
	private boolean done;

	@Field(name = "comment", type = "varchar(512)", constrain = "")
	private String comment;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getOrderCargoId() {
		return orderCargoId;
	}

	public void setOrderCargoId(Long orderCargoId) {
		this.orderCargoId = orderCargoId;
	}

	public Integer getNumber() {
		return number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public Long getCharger() {
		return charger;
	}

	public void setCharger(Long charger) {
		this.charger = charger;
	}

	public boolean isDone() {
		return done;
	}

	public void setDone(boolean done) {
		this.done = done;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getSerialNumber() {
		return serialNumber;
	}

	public void setSerialNumber(String serialNumber) {
		this.serialNumber = serialNumber;
	}
}
